package com.cse.controller;


import com.cse.dto.Result;
import com.cse.service.IFollowService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;


@RestController
@RequestMapping("/follow")
public class FollowController {

    @Resource
    private IFollowService followService;

    @PutMapping("/{id}/{isFollow}")
    public Result follow(@PathVariable("id") Long followUserid, @PathVariable("isFollow") Boolean isFollow){
        return followService.follow(followUserid,isFollow);
    }

    @GetMapping("/or/not/{id}")
    public Result isfollow(@PathVariable("id") Long followUserid){
        return followService.isfollow(followUserid);
    }

    @GetMapping("/common/{id}")
    public Result followCommon(@PathVariable("id") Long followUserId){
        return followService.followCommon(followUserId);
    }
}
